<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>数组转化</title>
</head>
<body>
    
</body>
</html>

<script>
    //将Map对象转化为数组有两种方式   (1)点语法  (2)Array.form()
    let hd = new Map([["houdurnen","后盾人"],['hdcms','开源系统'],["后盾人",'houdunren']]);
    // console.log(...hd);
    // console.log(...hd.entries());
    // console.log([...hd.values()].join('-'));
    // console.log(...hd.keys());

    
    //检索包含 后盾人 的值组成新Map
    let newArr = [...hd.entries()].filter(function(item){
        return item.includes('后盾人');
    });
    hd = new Map(newArr);
    console.log(hd.keys())

</script>